drop proc spa_SEC_GetUser
go
/*********************************************************************************************            
* PROCEDURE: spa_SEC_CreateUser            
* PURPOSE: Create a new user from FE website            
* NOTES:            
* CREATED: Nha Doan 5/01/2011           
* MODIFIED:             
*/            
/*'-------------------------------------------------------------------------------------------------*            
' Date       | Version | Ticket #    |       Author             | Description            
' ========== | ======= | =========== | =========================| ====================================================================            
' 5/01/2011  |  1.00   | 00000       | Nha Doan                 | CREATED NEW.
'-------------------------------------------------------------------------------------------------*            
*/
/*
Ex:
[spa_SEC_GetUser]            
	 @UserRecId = null,            
	 @LoginName = sysadmin,            
	 @ClientId = 1
*/            
create proc [spa_SEC_GetUser]            
 @UserRecId uniqueidentifier = null,            
 @LoginName varchar(30)=null,
 @ClientId int=null
         
as            
select * from SEC_Users
where (RecId = @UserRecId)
	or (LoginName = @LoginName and (ClientId = @ClientId or @ClientId = 0))